package com.wechat.page.api;

import java.util.concurrent.CompletableFuture;

import org.springframework.stereotype.Service;

import com.swak.annotation.FluxDepend;
import com.wechat.dto.ChatRoomDTO;
import com.wechat.service.ChatRoomServiceAsync;

/**
 * ChatApi.
 * 
 * @author 618lf
 */
@Service
public class ChatRoomApi {

	@FluxDepend
	private ChatRoomServiceAsync chatRoomService;

	/**
	 * 聊天室
	 * 
	 * @param chat
	 * @return
	 */
	public CompletableFuture<ChatRoomDTO> get(String id) {
		return this.chatRoomService.get(id);
	}

	/**
	 * 保存在本群的显示的昵称;
	 * 
	 * @param chat
	 * @return
	 */
	public CompletableFuture<ChatRoomDTO> saveDisplayName(ChatRoomDTO chatRoom) {
		return this.chatRoomService.saveDisplayName(chatRoom);
	}
}